home *** CD-ROM | disk | FTP | other *** search
- Path: li.net!jeremy
- From: jeremy@newshost.li.net (Jeremy Markman)
- Newsgroups: comp.lang.c++
- Subject: Re: another overloading question
- Date: 4 Apr 1996 17:44:59 GMT
- Organization: LI Net (Long Island Network)
- Distribution: world
- Message-ID: <4k11qr$m5d@linet06.li.net>
- References: <4ju98d$3al@panoramix.fi.upm.es>
- NNTP-Posting-Host: linet04.li.net
- X-Newsreader: TIN [version 1.2 PL2]
-
- Sacha (sacha@diafi.upm.es) wrote:
-
- : Hi,
-
- : Can I overload = for simple types?
-
- WHen you overload operators, the return type must be that class.
-
- THat is, when you add two integers, every operand is an integer. So,
- consequently, if you were to add or assign a class operator, each operand
- must be that class.
-
- So, it won't work in your case where you try and set a different type =
- to a class type...
-
- Make sense?
-